package com.ruoyi.project.system.base_family_info.mapper;

import java.math.BigDecimal;
import java.util.List;
import com.ruoyi.project.system.base_family_info.domain.BaseFamilyInfo;
import org.apache.ibatis.annotations.Mapper;

/**
 * 户信息Mapper接口
 * 
 * @author ruoyi
 * @date 2023-02-17
 */
@Mapper
public interface BaseFamilyInfoMapper 
{
    /**
     * 查询户信息
     * 
     * @param fid 户信息ID
     * @return 户信息
     */
    public BaseFamilyInfo selectBaseFamilyInfoByFid(String fid);

    /**
     * 查询户信息列表
     * 
     * @param baseFamilyInfo 户信息
     * @return 户信息集合
     */
    public List<BaseFamilyInfo> selectBaseFamilyInfoList(BaseFamilyInfo baseFamilyInfo);

    /**
     * 新增户信息
     * 
     * @param baseFamilyInfo 户信息
     * @return 结果
     */
    public int insertBaseFamilyInfo(BaseFamilyInfo baseFamilyInfo);

    /**
     * 修改户信息
     * 
     * @param baseFamilyInfo 户信息
     * @return 结果
     */
    public int updateBaseFamilyInfo(BaseFamilyInfo baseFamilyInfo);

    /**
     * 删除户信息
     * 
     * @param fid 户信息ID
     * @return 结果
     */
    public int deleteBaseFamilyInfoById(String fid);

    /**
     * 批量删除户信息
     * 
     * @param fids 需要删除的数据ID
     * @return 结果
     */
    public int deleteBaseFamilyInfoByIds(String[] fids);

    /**
     * 户信息人口数-1
     *
     * @param fid 户信息ID
     * @return 结果
     */
    public int logoutBaseFamilyInfoByFid(String fid);

    /**
     * 更新户主表人口数
     *
     * @param
     * @return 结果
     */
    public int updateBaseFamilyInfoNum(String fid,Integer num);

    /**
     * 修改户的耕种面积，户电话，户类别
     *
     * @param  农户基本信息
     * @return 结果
     */
    public int updateBaseFamilyInfoByEdit(String phone, BigDecimal area, Integer familyType, BigDecimal twoArea,BigDecimal otherArea,String fid);

    /**
     * 修改户主表耕种面积，户电话，户类别,户编号
     *
     * @param  农户基本信息
     * @return 结果
     */
    public int updateBaseFamilyInfoByEdit1(String phone, BigDecimal area,Integer familyType,BigDecimal twoArea,BigDecimal otherArea,String oldfid,String newfid);

    /**
     * 修改人口，实际，耕种，二轮级，其他
     * @param phone
     * @param area
     * @param familyType
     * @param twoArea
     * @param otherArea
     * @param fid
     * @return
     */
    public int updateSomeBaseFamilyInfoByEdit(String fid, BigDecimal area, BigDecimal twoArea, BigDecimal otherArea);

}
